Conversation
…scripts PR #324 removed deflections_2d_via_integral_from methods from PyAutoGalaxy but only copied the integrand functions to these scripts, not the actual quad-based computation loops. This adds the missing integral wrappers so each script computes deflections via scipy.integrate.quad and compares against the library's analytic/CSE/MGE methods. Also adds all missing integral functions to gnfw.py and gnfw_virial_mass_conc.py (tabulate_integral, surface_density_integrand, gnfw_deflection_func, gnfw_potential_func, deflection_func_sph). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR PyAutoLabs/PyAutoGalaxy#324 removed
deflections_2d_via_integral_frommethods from PyAutoGalaxy but only copied the integrand functions to themass_via_integralscripts — not the actualscipy.integrate.quadcomputation loops. This adds the missing integral wrappers so each script computes deflections via numerical integration and compares against the library's analytic/CSE/MGE methods.Also adds all missing integral functions to
gnfw.pyandgnfw_virial_mass_conc.pythat were never copied from the PR.Scripts Changed
scripts/mass_via_integral/gaussian.py— addeddeflections_2d_via_integral_fromwrapper, updated 4 configs to compare integral vs analyticscripts/mass_via_integral/sersic.py— added integral wrapper, updated 2 configs to compare integral vs CSEscripts/mass_via_integral/sersic_gradient.py— added integral wrapper, updated 2 configs to compare integral vs CSEscripts/mass_via_integral/nfw.py— added deflection and potential integral wrappers, updated 4 configs to compare integral vs analyticscripts/mass_via_integral/gnfw.py— added all missing integral functions (tabulate_integral, surface_density_integrand, gnfw_deflection_func, gnfw_potential_func, deflection_func_sph) plus wrappers for elliptical/spherical deflections and potential, updated 8 configsscripts/mass_via_integral/gnfw_virial_mass_conc.py— added spherical integral functions and wrapper, updated 1 configTest Plan
🤖 Generated with Claude Code